home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13495 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: erich.triumf.ca!bennett
  2. From: bennett@erich.triumf.ca (P.Bennett)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Newbie: Need Help with keyboard and timing
  5. Date: 7 Apr 1996 21:05 PST
  6. Organization: TRIUMF: Tri-University Meson Facility
  7. Distribution: world
  8. Message-ID: <7APR199621055343@erich.triumf.ca>
  9. References: <4k94j4$328@sanjuan.islandnet.com>
  10. NNTP-Posting-Host: erich.triumf.ca
  11. News-Software: VAX/VMS VNEWS 1.50    
  12.  
  13. In article <4k94j4$328@sanjuan.islandnet.com>, Abram Hindle <abehind@islandnet.com> writes...
  14. >Hi!
  15. >I really need help with getting keys pressed from the keyboard
  16. >but not stopping the program til a key is pressed. What I
  17. >want is IBM compatible way of getting input from the keyboard
  18. >much like basic's INKEY$ command. It's for a small little
  19. >game I'm making.
  20.  
  21. Borland (and Microsoft) provide non-ANSI functions for this - kbhit(), getch(),
  22. and getche(), all declared in conio.h
  23.  
  24. >Also, how do I time using milliseconds like the TIMER in
  25. >basic.
  26.  
  27. I don't speak BASIC, so don't know how TIMER works, but Borland provides a
  28. delay() function (in dos.h) that might work.
  29.  
  30. It pays to look through the library reference to see all the functions that are
  31. there (and it's often quicker than asking on a newsgroup.)
  32.  
  33. Peter Bennett VE7CEI                | Vessels shall be deemed to be in sight
  34. Internet: bennett@triumf.ca         | of one another only when one can be
  35. Packet: ve7cei@ve7kit.#vanc.bc.ca   | observed visually from the other
  36. TRIUMF, Vancouver, B.C., Canada     |                          ColRegs 3(k)
  37. GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
  38. or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.